<!DOCTYPE html>
<extend name="Base/base" />
<block name='head'>  
    <meta charset="utf-8">
    <link href="/Public/Index/css/workflow.css" rel="stylesheet" /> 
    <style type="text/css">
        .t4{color:#bbb}
        /*出差小结－转交下一步骤开始*/
        .trip_title h2 {
            font-size:1.2em;
            margin:1.2em;
            color:#5077aa;
        }
        .trip_next h3{
            font-size:1em;
            padding:0.8em;
        }
        .trip_next table{
            width:100%;
            /*border:1px solid red;*/
        }
        .trip_next table tr td{
            border:1px solid #CFDDEA;
            font-size:1.0em;
            padding:0.3em 0;
            /*text-align: center;*/
        }
        .trip_next table .value{
            width:80%;
            text-align: left;
            padding-left:10px;
        }
        .trip_next table .key{
            width:15%;
            text-align: center;
            background: #F0F0F0;
        }
        .top{
            height:5px;
        }
        .bottom{
            height:20px;

            .comments{
                border:1px solid red;
            }
            .com1 {
                width:10%;
                font-weight:inherit;
                text-align:left;
            }
        </style>
    </block>
    <block name="content" > 
        <form>
            <div class="bd">
                <div class="trip_title">
                    <h2>周报详情</h2>
                </div>
                <div class="work_cells trip_next">
                    <p class="top"></p>
                    <table>
                        <tr>
                            <td class="key">标题</td>
                            <td class="value">{$info.title}</td>
                        </tr>
                        <tr>
                            <td class="key">日期</td>
                            <td class="value">{$info.start_date|date="Y-m-d",###}至{$info.end_date|date="m-d",###}</td>
                        </tr>
                        <tr>
                            <td class="key">最后修改时间</td>
                            <td class="value">{$info.last_time|date="Y-m-d H:i:s",###}</td>
                        </tr>
                        <tr>
                            <td class="key">内容</td>
                            <td class="value"><textarea style="width:80%;height:20em;border:1px solid #CFDDEA;" readonly>{$info.content|htmlspecialchars_decode}</textarea></td>
                        </tr>
                        <tr>
                            <td class="key">阅读人员</td>
                        <if condition="$info.readers eq ''">
                            <td class="value">无人查阅</td>
                            <else />
                            <td class="value">{$info.readers|getMoreUsername}</td>
                        </if>   
                        </tr>
                        <tr>
                            <td class="key">评论相关</td>
                        <notempty name="info.comments">
                            <td class="value">
                            <foreach name="info.comments" item="comment">
                                <div style="border:3px solid #CFDDEA;width: 90%;margin-bottom: 10px;">
                                    <table style='margin:5px;width:99%;'>
                                        <tr>
                                            <td style="font-weight:bold;">{$comment.user_id|getChineseName}：{$comment.create_time|date="Y-m-d H:i:s",###}&nbsp;
                                                <a style="color:#437dba" class="replyWeekly pointer" data-id="{$comment.week_id}" data-key="{$comment.id}"> 回复</a>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="padding-left:2px;"><textarea style="width:98%;height:3em;border:1px solid #CFDDEA;" readonly>{$comment.content}</textarea></td>
                                        </tr>
                                        <if condition="$comment.reply neq ''">
                                            <tr>
                                                <td>
                                            <foreach name="comment.reply" item="reply">
                                                <p><font style='font-weight:bold'>回复（{$reply.create_time|date="Y-m-d H:i:s",###}）：</font>{$reply.content}</p>
                                                </foreach>
                                                </td>
                                                </tr>
                                            </if>
                                        </table>
                                    </div>
                                    <!--<div class="comments">{$comment.content}</div>-->
                                </foreach>
                                </td>

                                <else />
                                <td class="value">无人评论</td>
                            </notempty>
                            </tr>
                        </table>
                    </div>
                </div>
            </form>
            <p class="bottom"></p>
            <div class="button">
                <a class="am-btn" onclick="history.go(-1)">返 回</a>
            </div>

        </block>
        <block name="script">
            <script type="text/javascript" src="/Public/Index/js/form.js"></script>
            <script type="text/javascript" src="/Public/Index/js/diary.js"></script>
            <script type="text/javascript">
                    $(initreplyDiary());
            </script>
        </block>
